package com.tfjybj.itoo.exam.provider.service.impl;

import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.Reference;;
import com.dmsdbj.itoo.tool.base.service.impl.BaseServicePlusImpl;
import com.dmsdbj.itoo.tool.business.ItooResult;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tfjybj.itoo.exam.entity.SemesterEntity;
import com.tfjybj.itoo.exam.provider.dao.SemesterDao;
import com.tfjybj.itoo.exam.provider.service.SemesterService;
import com.tfjybj.itoo.teach.FacadeApi.SemesterApi;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * SemesterService接口实现类
 * ${base}表
 *
 * @author 杨江涛
 * @version 2.0.0
 * @since 2.0.0 2018-11-17 11:17:35
 */
@Service("semesterService")
public class SemesterServiceImpl extends BaseServicePlusImpl<SemesterDao, SemesterEntity> implements SemesterService {
	
	//region 模板生成

    @Resource
    private SemesterDao semesterDao;

    @DubboReference(check = false)
    private SemesterApi semesterApi;

	 @Override
    public PageInfo<SemesterEntity> queryByLikeName(String name, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(semesterDao.queryLikeName(name));
    }


    //endregion

    /* **********************************以下为非模板生成的内容********************************* */

    /**
     * 无参查询semester
     * @author 杨江涛
     * @since 2018年11月17日15:49:05
     * @return SemesterEntity
     */
    @Override
    public ItooResult selSemesterId() {
     return semesterApi.selSemesterId();
    }

}
